Method for handover between distributed access points and related device

ABSTRACT

According to a method for handover between distributed access points, an AP  1  receives a handover request sent by a central AP, where the handover request includes an address of a wireless terminal and an identifier of an AP  2;  and after receiving the handover request, the AP  1  sends a context handover request to the AP  2,  where the context handover request includes an unsent frame of the wireless terminal. In a handover process, the AP  1  may send, to the AP  2,  a buffered frame that fails to be sent to the wireless terminal in time, and send the frame to the wireless terminal by using the AP  2,  so as to reduce a downlink packet loss when the wireless terminal is handed over between the AP  1  and the AP  2.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to Chinese Patent Application No. 201610614018.X, filed on Jul. 29, 2016, which is hereby incorporated by reference in its entirety.

TECHNICAL FIELD

The present invention relates to the field of communications technologies, and in particular, to a method for handover between distributed APs, and a related device.

BACKGROUND

When a wireless terminal in a wireless local area network (WLAN) moves, the wireless terminal is handed over between access points (AP). The handover means that when the wireless terminal moves from a coverage area of one AP to a coverage area of another AP, the wireless terminal connects to the latter AP instead of connecting to the former AP. In a handover process of the wireless terminal, a central AP may immediately forward, to the latter AP instead of the former AP, a newly received packet that is to be sent to the wireless terminal. However, in this case, the former AP may still have some buffered packets that fail to be sent to the wireless terminal in time, and consequently, a downlink packet loss is caused. Herein, a packet sent by a distributed AP to the wireless terminal is referred to as a downlink packet, and a packet sent by the wireless terminal to the distributed AP is referred to as an uplink packet. If a lost downlink packet is a voice service packet, transient loss of voice occurs. If a lost downlink packet is a video service packet, transient frame freezing and artifacts appear. Consequently, user experience is reduced.

SUMMARY

This application is to provide an improved handover method.

A first aspect provides a method for handover between different distributed APs in a same mobility domain (that is, between the different distributed APs are managed and controlled by a same central AP). A first distributed AP receives a handover request sent by a central AP, where the handover request includes an address of a wireless terminal and an identifier of a second distributed AP. After receiving the handover request, the first distributed AP sends a context handover request to the second distributed AP, where the context handover request includes an unsent frame of the wireless terminal, the unsent frame is a frame that has not been sent to the wireless terminal among frames of the wireless terminal that are stored in the first distributed AP, and the context handover request is used to instruct the second distributed AP to send the unsent frame to the wireless terminal.

In this technical solution, in a process in which the wireless terminal moves from a coverage area of the first distributed AP to a coverage area of the second distributed AP, the first distributed AP may send, to the second distributed AP, a buffered frame that fails to be sent to the wireless terminal in time, and the second distributed AP sends the frame to the wireless terminal, so as to reduce a downlink packet loss when the wireless terminal is handed over between the first distributed AP and the second distributed AP.

In a first possible implementation manner of the first aspect, the first distributed AP may further receive a first Ethernet frame sent by the central AP, where a destination address of the first Ethernet frame is the address of the wireless terminal; the first distributed AP saves the first Ethernet frame, where the frames of the wireless terminal that are stored in the first distributed AP include the first Ethernet frame, or the first distributed AP converts the first Ethernet frame into a first radio frame, and saves the first radio frame, where the frames of the wireless terminal that are stored in the first distributed AP include the first radio frame; and the first distributed AP sends a first instruction to the central AP when a storage volume of the first distributed AP is greater than a threshold, where the first instruction includes the address of the wireless terminal, and the first instruction is used to instruct the central AP to decrease a rate of sending an Ethernet frame of the wireless terminal.

The first distributed AP sends the unsent frame, that is, the buffered frame that fails to be sent to the wireless terminal in time, to the second distributed AP, and the second distributed AP sends the frame to the wireless terminal. The unsent frame needs to pass through the second distributed AP, and consequently, a downlink packet delay of the wireless terminal is increased while a downlink packet loss of the wireless terminal is reduced. Therefore, to reduce the downlink packet delay of the wireless terminal as much as possible, a quantity of frames stored on the distributed AP needs to be controlled as much as possible, so that when the first distributed AP receives the handover request, a small quantity of frames of the wireless terminal are stored on the first distributed AP, that is, a quantity of downlink packets that require detouring is reduced.

With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, the first instruction is further used to instruct the central AP to save a second Ethernet frame whose destination address is the address of the wireless terminal. The first distributed AP may further receive a context handover acknowledgment sent by the second distributed AP, where the context handover acknowledgment is an acknowledgment of the second distributed AP for the context handover request. The first distributed AP sends a handover acknowledgment to the central AP in response to the context handover acknowledgment, where the handover acknowledgment is used to instruct the central AP to start to send the second Ethernet frame stored in the central AP to the second distributed AP.

If the central AP receives the handover acknowledgment sent by the first distributed AP, it indicates that the first distributed AP has completed sending of the unsent frame. The central AP sends the stored second Ethernet frame to the second distributed AP only after receiving the handover acknowledgment. Therefore, out-of-order of downlink packets can be reduced.

With reference to the first or the second possible implementation manner of the first aspect, in a third possible implementation manner, after receiving the handover request sent by the central AP, the first distributed AP may further preferentially send the frames of the wireless terminal that are stored in the first distributed AP to the wireless terminal.

The first distributed AP sends the unsent frame, that is, the buffered frame that fails to be sent to the wireless terminal in time, to the second distributed AP, and the second distributed AP sends the frame to the wireless terminal. The unsent frame needs to pass through the second distributed AP, and consequently, a downlink packet delay of the wireless terminal is increased while a downlink packet loss of the wireless terminal is reduced. Therefore, to reduce the downlink packet delay of the wireless terminal as much as possible, the first distributed AP preferentially sends a frame of the wireless terminal after receiving the handover request, so as to reduce a quantity of unsent frames, that is, reduce a quantity of downlink packets that require detouring.

With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner, the method further includes:

if it is detected that a transmission rate of a successfully sent frame among the stored frames of the wireless terminal is less than a first threshold, stopping sending, by the first distributed AP, the frames of the wireless terminal that are stored in the first distributed AP to the wireless terminal; or

if it is detected that received signal strength of an acknowledgment frame of a successfully sent frame among the stored frames of the wireless terminal is less than a second threshold, stopping sending, by the first distributed AP, the frames of the wireless terminal that are stored in the first distributed AP to the wireless terminal; or

if sending of a frame to the wireless terminal fails, stopping sending, by the first distributed AP, the frames of the wireless terminal that are stored in the first distributed AP to the wireless terminal.

A second aspect provides another method for handover between different distributed APs in a same mobility domain. A central AP receives a first instruction sent by a first distributed AP, where the first instruction includes an address of a wireless terminal, and the first distributed AP is a distributed AP in multiple distributed APs that serves the wireless terminal. The central AP decreases, in response to the first instruction, a rate of sending an Ethernet frame of the first distributed AP, and saves the Ethernet frame. When the wireless terminal is handed over from the first distributed AP to a second distributed AP, the central AP sends the Ethernet frame to the second distributed AP, and sends a handover request to the first distributed AP, where the handover request includes the address of the wireless terminal and an identifier of the second distributed AP, the handover request is used to instruct the first distributed AP to send an unsent frame of the wireless terminal to the second distributed AP, and the unsent frame is a frame that has not been sent to the wireless terminal among frames of the wireless terminal that are stored in the first distributed AP.

When the wireless terminal is handed over from the first distributed AP to the second distributed AP, the central AP instructs the first distributed AP to send the unsent frame to the wireless terminal by using the second distributed AP, so as to reduce a downlink packet loss when the wireless terminal is handed over between the first distributed AP and the second distributed AP. The unsent frame needs to pass through the second distributed AP, and consequently, a downlink packet delay of the wireless terminal is increased while a downlink packet loss of the wireless terminal is reduced. Therefore, to reduce the downlink packet delay of the wireless terminal as much as possible, the central AP decreases a rate of sending the Ethernet frame, to control a quantity of frames stored on a distributed AP. After the handover, the central AP sends the stored Ethernet frame to the second distributed AP, and the second distributed AP sends the Ethernet frame to the wireless terminal.

In a first possible implementation manner of the second aspect, the sending the Ethernet frame to the second distributed AP includes:

sending, by the central AP, the Ethernet frame to the second distributed AP after the central AP receives a handover acknowledgment sent by the first distributed AP, where the handover acknowledgment is an acknowledgment for the handover request after the first distributed AP sends the unsent frame of the wireless terminal to the second distributed AP.

If the central AP receives the handover acknowledgment sent by the first distributed AP, it indicates that the first distributed AP has completed sending of the unsent frame. The central AP sends a stored second Ethernet frame to the second distributed AP only after receiving the handover acknowledgment. Therefore, out-of-order of downlink packets can be reduced.

With reference to the second aspect or the first possible implementation manner of the second aspect, in a second possible implementation manner, the central AP may further receive a context handover request sent by the first distributed AP, where the context handover request includes the unsent frame of the wireless terminal, the unsent frame is a frame that has not been sent to the wireless terminal among the frames of the wireless terminal that are stored in the first distributed AP; and the central AP forwards the context handover request to the second distributed AP.

A third aspect provides a distributed AP. The distributed AP includes a processor, a memory, and a network interface. The network interface includes a wireless interface. Optionally, the network interface may further include a wired interface. The distributed AP may be connected to a central AP in a wired manner by using the wired interface to receive/send messages involved in the foregoing methods from/to the central AP. Alternatively, the distributed AP may be connected to the central AP by using the wireless interface to receive/send messages involved in the foregoing methods from/to the central AP. The distributed AP performs wireless communication with a wireless terminal by using the wireless interface. The processor is configured to perform some or all procedures in the first aspect.

A fourth aspect provides another distributed AP. The distributed AP includes a processing module, a sending module, and a receiving module. The distributed AP implements some or all methods in the first aspect by using the foregoing modules.

A fifth aspect provides a computer storage medium. The computer storage medium stores a program, and the program performs some or all steps in the first aspect.

A sixth aspect provides a central AP. The central AP includes a processor, a memory, and a network interface. The processor is connected to the memory and the network interface. For example, the processor may be connected to the memory and the network interface by using a bus. The network interface includes one or more Ethernet interfaces. If the network interface includes one Ethernet interface, the central AP may be connected to a switching device by using the Ethernet interface. One or more network interfaces of the switching device are connected to a distributed AP in a wired manner to receive/send messages involved in the foregoing methods from/to the distributed AP. A remaining network interface of the switching device is connected to another network device in a wired manner to receive an Ethernet frame sent by the another network device. If the network interface includes multiple Ethernet interfaces, one or more Ethernet interfaces in the multiple Ethernet interfaces are connected to a distributed AP in a wired manner to receive/send messages involved in the foregoing methods from/to the distributed AP. A remaining network interface in the multiple Ethernet interfaces is connected to another network device in a wired manner to receive an Ethernet frame sent by the another network device. The processor is configured to perform some or all procedures in the second aspect.

A seventh aspect provides another central AP. The central AP includes a processing module, a sending module, and a receiving module. The central AP implements some or all methods of the second aspect by using the foregoing modules.

An eighth aspect provides a computer storage medium. The computer storage medium stores a program, and the program performs some or all steps in the second aspect.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings required for describing the embodiments. Apparently, the accompanying drawings in the following description show some embodiments of the present invention, and a person of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts.

FIG. 1 is a schematic structural diagram of a central distributed architecture according to an embodiment of the present invention;

FIG. 2A and FIG. 2B are a schematic flowchart of a method for handover between distributed APs according to an embodiment of the present invention;

FIG. 3 is a schematic diagram of a handover scenario according to an embodiment of the present invention;

FIG. 4 is a schematic structural diagram of a central AP according to an embodiment of the present invention;

FIG. 5 is a schematic structural diagram of another central AP according to an embodiment of the present invention;

FIG. 6 is a schematic structural diagram of a distributed AP according to an embodiment of the present invention; and

FIG. 7 is a schematic structural diagram of another distributed AP according to an embodiment of the present invention.

DESCRIPTION OF EMBODIMENTS

As shown in FIG. 1, a central distributed architecture includes a central AP and at least two distributed APs. The distributed AP is an AP having a radio frequency function. The central AP may be an AP having a radio frequency function, or may be a network device having no radio frequency function. For more detailed functions of the central AP and the distributed AP, refer to the following description.

The central AP has a function (excluding a radio frequency part) of a conventional AP, and some functions of a radio controller are added to the central AP, such as functions of controlling association for a wireless terminal and handover inside the central AP. In addition, the central AP further has a function of managing the distributed AP. The function of handover inside the central AP refers to a function that enables a wireless terminal to be handed over between different distributed APs controlled by a same central AP. In addition to the foregoing functions, the central AP may further have a broadband service-related function and a service forwarding-related function of the conventional AP, for example, quality of service (QoS) and an access control list (ACL). The foregoing radio controller may be an Access Controller (AC) in the Control And Provisioning of Wireless Access Points (CAPWAP) protocol.

The central AP may further have a function of a gateway. The central AP may further have a network access control (NAC) function and a function of a Dynamic Host Configuration Protocol (DHCP) server.

The distributed AP is a radio frequency module separated from the conventional AP. The distributed AP is responsible for processing an air-interface packet in a WLAN, and communicates with the central AP by using a tunnel of a wired network (for example, the Ethernet). The central AP may communicate with the distributed AP directly or by using the CAPWAP protocol.

A control channel between a Wireless Termination Point (WTP) and an AC is provided in the CAPWAP protocol. In the embodiments of the present invention, when the distributed AP communicates with the central AP by using a CAPWAP tunnel, the central AP is used as the AC in the CAPWAP protocol, and the distributed AP is used as the WTP in the CAPWAP protocol.

The embodiments of the present invention are applicable to a scenario in which a wireless terminal is handed over between different distributed APs controlled by a same central AP. The wireless terminal is any device having a function of a WLAN station (STA), for example, a cell phone, a smartphone, a computer, a tablet computer, a personal digital assistant (PDA), a mobile Internet device (MID), a wearable device, or an e-book reader.

Referring to FIG. 2A and FIG. 2B, FIG. 2A and FIG. 2B are a schematic flowchart of a method for handover between distributed APs according to an embodiment of the present invention. In coverage areas of distributed APs controlled by a same central AP, multiple wireless terminals may be handed over, and the wireless terminals have a same procedure of handover between distributed APs. Therefore, one of the wireless terminals, that is, a target wireless terminal, is used as an example for description in this embodiment of the present invention. As shown in FIG. 2A and FIG. 2B, the method includes the following steps.

S201. A central AP receives a first Ethernet frame.

The central AP may receive the first Ethernet frame from another wired network device or a distributed AP. A destination address of the first Ethernet frame is an address of the target wireless terminal, for example, a media access control (MAC) address of the target wireless terminal. The central AP may identify the first Ethernet frame of the target wireless terminal according to the address of the target wireless terminal.

S202. The central AP sends the first Ethernet frame to a first distributed AP (hereinafter referred to as an AP 1).

The AP 1 is a distributed AP that serves the target wireless terminal before the target wireless terminal is handed over.

S203. The AP 1 receives the first Ethernet frame.

S204. Optionally, the AP 1 saves the first Ethernet frame.

The AP 1 may leave a storage area for storing Ethernet frames of multiple wireless terminals, and distinguish Ethernet frames of different wireless terminals according to addresses of the wireless terminals. The AP 1 may directly save the first Ethernet frame after receiving the first Ethernet frame of the target wireless terminal. Alternatively, after converting the first Ethernet frame into a first radio frame, the AP1 may save the first radio frame.

S205. If a storage volume is greater than a threshold, the AP 1 sends a first instruction to the central AP, where the first instruction includes an address of a target wireless terminal.

Optionally, that the storage volume is greater than the threshold may mean that a volume of stored frames of the target wireless terminal is greater than the threshold. That the volume of frames of the target wireless terminal is greater than the threshold may mean that the quantity of frames of the target wireless terminal is greater than a data threshold, or that a data amount of the frames of the target wireless terminal is greater than a capacity threshold.

Optionally, that the storage volume is greater than the threshold may mean that a total volume of stored frames of all wireless terminals is greater than the threshold. That the total volume of frames of all wireless terminals is greater than the threshold may mean that the total quantity of frames of all the wireless terminals is greater than the data threshold, or that a total data amount of the frames of all the wireless terminals is greater than the capacity threshold. If the total volume of stored frames of all the wireless terminals is greater than the threshold, the first instruction may include addresses of all the wireless terminals or addresses of some wireless terminals.

S206. The central AP receives the first instruction.

S207. The central AP responds to the first instruction.

An operation performed when the central AP responds to the first instruction may be as follows:

The central AP decreases a rate of sending an Ethernet frame of the target wireless terminal. For example, after the central AP receives the first instruction, if a rate of receiving the Ethernet frame of the target wireless terminal is greater than a sending threshold X, the central AP sends the Ethernet frame of the target wireless terminal at a rate X, and saves an unset Ethernet frame. For another example, after receiving the first instruction, the central AP may suspend sending of the Ethernet frame of the target wireless terminal.

The central AP saves a second Ethernet frame whose destination address is the address of the target wireless terminal.

S208. When the target wireless terminal meets a handover condition, the central AP determines that the target wireless terminal is to be handed over from the AP 1 to a second distributed AP (hereinafter referred to as an AP 2).

The AP 2 is a distributed AP that serves the target wireless terminal after the target wireless terminal is handed over.

Optionally, the central AP may determine, in real time, whether the target wireless terminal meets the handover condition. As shown in FIG. 3, after the target wireless terminal is connected to a network, a currently-associated distributed AP (for example, the AP 2 in FIG. 3) and neighboring distributed APs (for example, the AP 1 and an AP 3 in FIG. 3) of the currently-associated distributed AP periodically report a received signal strength indication (RSSI) of the target wireless terminal to the central AP at the same time. The central AP determines, based on the RSSIs of the target wireless terminal that are monitored by the distributed APs, whether the handover condition is met. If the handover condition is met, the central AP determines that the target wireless terminal is handed over from the AP 1 to the AP 2.

In some embodiments, the central AP separately compares an RSSI sent by a distributed AP that currently serves the target wireless terminal with an RSSI sent by a neighboring distributed AP of the distribute AP that currently serves the target wireless terminal. If a difference between strength indicated by the RSSI sent by the neighboring distributed AP and strength indicated by the RSSI sent by the distributed AP that currently serves the target wireless terminal reaches a specific threshold, and in a subsequent period of time, the strength indicated by the RSSI sent by the neighboring distributed AP is increasingly high and the strength indicated by the RSSI sent by the distributed AP that currently serves the target wireless terminal is increasingly low, the central AP determines that the handover condition is met. As shown in FIG. 3, it is assumed that an RSSI sent by the AP 2 is an RSSI 2, an RSSI sent by the AP 1 is an RSSI 1, and an RSSI sent by the AP 3 is an RSSI 3. If a difference obtained after subtracting the RSSI 2 from the RSSI 3 reaches a specific threshold, and in a subsequent period of time, strength indicated by the RSSI 3 is increasingly high and strength indicated by the RSSI 2 is increasingly low, the central AP determines that the handover condition is met.

The handover condition may be another combination that can be used for handover determining, for example, the strength indicated by the RSSI sent by the neighboring distributed AP exceeds a specific threshold, and the strength indicated by the RSSI sent by the distributed AP that currently serves the target wireless terminal is less than a specific threshold.

S209. The central AP sends a handover request to the AP 1.

The handover request includes the address of the target wireless terminal, for example, a MAC address of the target wireless terminal, and an identifier of the AP 2, for example, a MAC address or an Internet Protocol (IP) address of the AP 2. The handover request is used to notify the AP 1 that the target wireless terminal is to move out from a coverage area of the AP 1 to a coverage area of the AP 2.

S210. The AP 1 receives the handover request.

Optionally, the AP 1 may send a second instruction to the target wireless terminal.

Optionally, the AP 1 may repeatedly send the second instruction. The second instruction is used to instruct the target wireless terminal to suspend sending of a radio frame.

Optionally, the second instruction may include duration in which suspension of sending of a radio frame is instructed. It is assumed that the duration that is indicated by the second instruction and in which sending of a radio frame is suspended is T. When receiving the second instruction, the target wireless terminal sends a radio frame after a time period T.

S211. The AP 1 sends a context handover request to the AP 2, where the context handover request includes an unsent frame of the target wireless terminal.

The unsent frame is a frame that has not been sent to the target wireless terminal among frames of the target wireless terminal that are stored in the AP 1. If the frames of the target wireless terminal that are stored in the AP 1 are Ethernet frames, the unsent frame of the target wireless terminal is a frame whose destination address is the address of the target wireless terminal. If the frames of the target wireless terminal that are stored in the AP 1 are radio frames, the unsent frame of the target wireless terminal is a frame whose receiver address is the address of the target wireless terminal.

Optionally, after the AP 1 receives the handover request sent by the central AP, the AP 1 may preferentially send the frames of the target wireless terminal that are stored in the AP 1 to the target wireless terminal. After the central AP sends the handover request, an AP that serves the target wireless terminal has changed to the AP 2. However, because the handover occurs just recently, the target wireless terminal may still receive a radio signal of the AP 1. After the handover, the AP 1 may still attempt to send the frames of the target wireless terminal that are stored in the AP 1 to the target wireless terminal. If the AP 1 stores a few frames of the target wireless terminal, the AP 1 may even send all frames of the target wireless terminal in time, and therefore, sending of the context handover request to the AP 2 is avoided. In any case, in order to send as many frames as possible to the target wireless terminal when the target wireless terminal can still receive the radio signal of the AP 1, the AP 1 may preferentially send the frames of the target wireless terminal.

For example, during downlink packet scheduling, the frames of the target wireless terminal may be preferentially sent, that is, the frames of the target wireless terminal are sent before a frame of another wireless terminal is sent. For another example, the AP 1 sends a WLAN frame of the target wireless terminal by using a high-priority access category.

Further optionally, in a process in which the AP 1 preferentially sends the frames of the target wireless terminal that are stored in the AP 1 to the target wireless terminal, if any one or more of the following cases occur, the AP 1 stops sending the frames of the target wireless terminal that are stored in the AP 1 to the target wireless terminal.

Case 1: The AP 1 may detect transmission rates of the stored frames of the target wireless terminal, and stop sending the frames of the target wireless terminal if it is detected that a transmission rate of a successfully sent frame is less than a first threshold (for example, 6 Mbps). It is assumed that the frames of the target wireless terminal that are stored in the AP 1 include five frames {A, B, C, D,E}. The AP 1 sends the frame A to the target wireless terminal and records a transmission rate of the frame A. If an acknowledgment frame replied with by the target wireless terminal is received, it indicates that the frame A is successfully sent. The AP 1 then compares the transmission rate of the frame A with the first threshold, and if the transmission rate of the frame A is less than the first threshold, stops sending the frames of the target wireless terminal and uses {B, C, D, E} as unsent frames of the target wireless terminal.

Case 2: The AP 1 may detect received signal strength of an acknowledgment frame of a successfully sent frame in the stored frames of the target wireless terminal, and stop sending the frames of the target wireless terminal if it is detected that the received signal strength of the acknowledgement frame of the sent frame is less than a second threshold (for example, −70 dBm). It is assumed that the frames of the target wireless terminal that are stored in the AP 1 include five frames {A, B, C, D, E}. The AP 1 sends the frame A to the target wireless terminal. If an acknowledgment frame replied with by the target wireless terminal is received, it indicates that the frame A is successfully sent. The AP 1 obtains received signal strength of the acknowledgment frame, and if the received signal strength of the acknowledgment frame is less than the second threshold, stops sending the frames of the target wireless terminal and uses {B, C, D, E} as unsent frames of the target wireless terminal.

Case 3: The AP 1 may detect whether sending of a frame to the target wireless terminal fails, and stop sending the frames of the target wireless terminal if it is detected that sending of a frame to the target wireless terminal fails. It is assumed that the frames of the target wireless terminal that are stored in the AP 1 include five frames {A, B, C, D, E}. The AP 1 sends the frame A to the target wireless terminal. If no acknowledgment frame replied with by the target wireless terminal is received, it indicates that sending of the frame A fails. The AP 1 stops sending the frames of the target wireless terminal, and uses {B, C, D, E} as unsent frames of the target wireless terminal.

If the frames of the target wireless terminal that are stored in the AP 1 are arranged in a form of a frame queue, optionally, the frame queue may be divided into a hardware queue and a software queue. A frame in the software queue is in a buffered state, and a frame in the hardware queue is to be sent or is being sent in a radio frequency chip. The AP 1 may directly use the frame in the software queue as the unsent frame of the target wireless terminal, and send frames in the hardware queue to the target wireless terminal in sequence. If it is detected that sending of a frame in the hardware queue fails, the AP 1 uses a remaining frame in the hardware queue and the frame in the software queue as unsent frames of the target wireless terminal.

The AP 1 may directly send the context handover request to the AP 2, for example, when the AP 1 and the AP 2 are connected in a network. Optionally, the context handover request reaches the AP 2 through the central AP after being sent by the AP 1. For example, when the AP 1 and the AP 2 are disconnected in the network, the AP 1 may send the context handover request to the central AP and the central AP sends the context handover request to the AP 2. FIG. 2A and FIG. 2B show only a case in which the AP 1 directly communicates with the AP 2, and a case in which forwarding is performed by using the central AP is omitted.

Optionally, if the unsent frames of the target wireless terminal exceed a third threshold, the AP 1 may send multiple context handover requests to the AP 2 till the unsent frames of the target wireless terminal are sent, and the context handover requests include different unsent frames of the target wireless terminal.

Optionally, the context handover request may further include a virtual basic service set identifier (BSSID), a user key, and the like of the target wireless terminal.

The central AP may generate multiple virtual BSSIDs. After the target wireless terminal accesses any distributed AP of the central AP, the central AP specifies a virtual BSSID for the target wireless terminal. The central AP may generate multiple virtual BSSIDs in advance, and specify one of the virtual BSSIDs for the target wireless terminal after the target wireless terminal accesses any distributed AP. Alternatively, the central AP may not generate a virtual BSSID in advance, but after the target wireless terminal accesses any distributed AP, generate a virtual BSSID and specify the virtual BSSID for the target wireless terminal. When the target wireless terminal is handed over within a range of the central AP (that is, a range of all distributed APs of the central AP), the virtual BSSID keeps unchanged. That is, when sending a WLAN frame to the target wireless terminal, each distributed AP of the central AP fills the virtual BSSID in a field that is in the WLAN frame and in which a MAC address of the AP needs to be filled, for example, a sender address field and a BSSID field. Therefore, when the target wireless terminal is in the range of the central AP, the target wireless terminal considers that the target wireless terminal is communicating with an AP whose BSSID is the virtual BSSID. The address of the target wireless terminal is used to notify the AP 2 that the target wireless terminal is to move to the coverage area of the AP 2. The user key of the target wireless terminal is data that is related to encryption and decryption and used when the target wireless terminal communicates with the AP 1.

S212. The AP 2 receives the context handover request.

If the AP 1 sends multiple context handover requests, correspondingly, the AP 2 may receive the multiple context handover requests. When receiving the context handover request, the AP 2 creates a context for the target wireless terminal, and the context is used to record data associated with the target wireless terminal, for example, the address of the target wireless terminal and the corresponding virtual BSSID. If the context handover request further includes the user key of the target wireless terminal, the AP 2 further configures the user key on an encryption and decryption module of the AP 2 when receiving the context handover request.

S213. The AP 2 sends the unsent frame to the target wireless terminal.

If the AP 1 sends multiple context handover requests, each time a context handover request is received, the AP 2 may extract an unsent frame in the context handover request and send the unsent frame to the target wireless terminal. Alternatively, the AP 2 may send, only after extracting unsent frames in all the context handover requests, the extracted unsent frames to the target wireless terminal.

S214. Optionally, the AP 2 sends a context handover acknowledgment to the AP 1.

If the AP 1 sends multiple context handover requests to the AP 2, the AP 2 may send a context handover acknowledgment for each context handover request, or the AP 2 may reply with one context handover acknowledgment for all the context handover requests.

Steps S213 and S214 are not performed in a strict sequence and may be performed simultaneously.

S215. Optionally, the AP 1 receives the context handover acknowledgment.

S216. Optionally, the AP 1 sends a handover acknowledgment to the central AP in response to the context handover acknowledgment.

The handover acknowledgment is used to instruct the central AP to start to send the stored second Ethernet frame of the target wireless terminal to the AP 2. The AP 1 may alternatively send the handover acknowledgment to the central AP at any moment after receiving the handover request.

If the AP 1 sends multiple context handover requests to the AP 2, the AP 1 may send the handover acknowledgment to the central AP only after receiving the last context handover acknowledgment, or the AP 1 may send the handover acknowledgment to the central AP when receiving the first context handover acknowledgment.

S217. Optionally, the central AP receives the handover acknowledgment.

S218. The central AP sends the second Ethernet frame of the target wireless terminal to the AP 2.

In this embodiment, the central AP sends the second Ethernet frame of the target wireless terminal to the AP 2 only after receiving the handover acknowledgment, so as to reduce out-of-order of downlink packets. Alternatively, the central AP may send the second Ethernet frame of the target wireless terminal to the AP 2 when determining that the target wireless terminal is handed over from the AP 1 to the AP 2.

For a processing procedure after the AP 2 receives the second Ethernet frame, reference may be made to the foregoing related description after the AP 1 receives the first Ethernet frame sent by the central AP, and details are not described herein.

In the embodiment shown in FIG. 2A and FIG. 2B, in a process in which a target wireless terminal moves from a coverage area of an AP 1 to a coverage area of an AP 2, the AP 1 may send, to the AP 2, a buffered frame that is that fails to be sent to the target wireless terminal in time, and send the frame to the target wireless terminal by using the AP 2, so as to reduce a downlink packet loss when the target wireless terminal is handed over between the AP 1 and the AP 2.

Referring to FIG. 4, FIG. 4 is a schematic structural diagram of a central AP according to an embodiment of the present invention. As shown in FIG. 4, the central AP includes a processor 41, a memory 42, and a network interface 43. The processor 41 is connected to the memory 42 and the network interface 43. For example, the processor 41 may be connected to the memory 42 and the network interface 43 by using a bus.

The processor 41 is configured to support the central AP in performing a corresponding function in the foregoing method. The processor 41 may be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof. The foregoing hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The foregoing PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof

The memory 42 is configured to store a handover condition, an unsent frame of a wireless terminal, and the like. The memory 42 may include a volatile memory, for example, a random access memory (RAM). The memory 42 may also include a non-volatile memory, for example, a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD). Alternatively, the memory 42 may include a combination of the foregoing types of memories.

The network interface 43 includes one or more Ethernet interfaces. If the network interface 43 includes one Ethernet interface, the central AP may be connected to a switching device by using the Ethernet interface. One or more network interfaces of the switching device are connected to a distributed AP in a wired manner to receive/send messages involved in the foregoing methods from/to the distributed AP. A remaining network interface of the switching device is connected to another network device in a wired manner to receive an Ethernet frame sent by the another network device. If the network interface 43 includes multiple Ethernet interfaces, one or more Ethernet interfaces in the multiple Ethernet interfaces are connected to a distributed AP in a wired manner to receive/send messages involved in the foregoing methods from/to the distributed AP. A remaining network interface in the multiple Ethernet interfaces is connected to another network device in a wired manner to receive an Ethernet frame sent by the another network device.

The processor 41 may perform the following operations:

receiving, by using the network interface 43, a first instruction sent by a first distributed AP, where the first instruction includes an address of the wireless terminal, and the first distributed AP is a distributed AP in multiple distributed APs that serves the wireless terminal; decreasing, in response to the first instruction, a rate of sending an Ethernet frame of the first distributed AP, and saving the Ethernet frame to the memory 42; and when determining that the wireless terminal is handed over from the first distributed AP to a second distributed AP, sending the Ethernet frame to the second distributed AP by using the network interface 43, and sending a handover request to the first distributed AP by using the network interface 43, where the handover request includes the address of the wireless terminal and an identifier of the second distributed AP, the handover request is used to instruct the first distributed AP to send the unsent frame of the wireless terminal to the second distributed AP, and the unsent frame is a frame that has not been sent to the wireless terminal among frames of the wireless terminal that are stored in the first distributed AP.

Further, after receiving, by using the network interface 43, a handover acknowledgment sent by the first distributed AP, the processor 41 may further send the Ethernet frame to the second distributed AP by using the network interface 43.

Referring to FIG. 5, FIG. 5 is a schematic structural diagram of another central AP according to an embodiment of the present invention. As shown in FIG. 5, the central AP includes a processing module 51, a sending module 52, and a receiving module 53. The processing module 51 implements a function of the processor shown in FIG. 4. The sending module 52 and the receiving module 53 implement a function of the network interface shown in FIG. 4.

Referring to FIG. 6, FIG. 6 is a schematic structural diagram of a distributed AP according to an embodiment of the present invention. As shown in FIG. 6, the distributed AP includes a processor 61, a memory 62, and a network interface 63. The processor 61 is connected to the memory 62 and the network interface 63. For example, the processor 61 may be connected to the memory 62 and the network interface 63 by using a bus.

The processor 61 is configured to support the distributed AP in performing a corresponding function in the foregoing method. The processor 61 may be a CPU, an NP, a hardware chip, a radio frequency (RF) chip, a baseband chip, or any combination thereof. The foregoing hardware chip may be an ASIC, a PLD, or a combination thereof. The foregoing PLD may be a CPLD, an FPGA, GAL, or any combination thereof.

The network interface 63 includes a wireless interface 632. Optionally, the network interface 63 may further include a wired interface 631. The distributed AP may be connected to a central AP in a wired manner by using the wired interface 631 to receive/send messages involved in the foregoing methods from/to the central AP. Alternatively, the distributed AP may be connected to the central AP by using the wireless interface 632 to receive/send messages involved in the foregoing methods from/to the central AP. The distributed AP performs wireless communication with a wireless terminal by using the wireless interface 632. The wireless interface 632 includes an antenna. The memory 62 may include a volatile memory, for example, a RAM. The memory 62 may also include a non-volatile memory, for example, a ROM, a flash memory, an HDD, or an SSD. Alternatively, the memory 62 may include a combination of the foregoing types of memories.

The processor 61 may perform the following operations:

receiving, by using the network interface 63, a handover request sent by the central AP, where the handover request includes an address of the wireless terminal and an identifier of a second distributed AP; and after receiving the handover request, sending a context handover request to the second distributed AP by using the network interface 63, where the context handover request includes an unsent frame of the wireless terminal, the unsent frame is a frame that has not been sent to the wireless terminal among stored frames of the wireless terminal, and the context handover request is used to instruct the second distributed AP to send the unsent frame to the wireless terminal.

Further, the processor 61 may further receive, by using the network interface, a first Ethernet frame sent by the central AP, where a destination address of the first Ethernet frame is the address of the wireless terminal; save the first Ethernet frame to the memory 62, where the stored frames of the wireless terminal include the first Ethernet frame, or convert the first Ethernet frame into a first radio frame and save the first radio frame to the memory, where the stored frames of the wireless terminal include the first radio frame; and send a first instruction to the central AP by using the network interface 63 when a storage volume is greater than a threshold, where the first instruction includes the address of the wireless terminal, and the first instruction is used to instruct the central AP to decrease a rate of sending an Ethernet frame of the wireless terminal.

Further, the first instruction is further used to instruct the central AP to save a second Ethernet frame whose destination address is the address of the wireless terminal. The processor 61 may further receive, by using the network interface 63, a context handover acknowledgment sent by the second distributed AP, where the context handover acknowledgment is an acknowledgment of the second distributed AP for the context handover request; and send a handover acknowledgment to the central AP by using the network interface 63 in response to the context handover acknowledgment, where the handover acknowledgment is used to instruct the central AP to send the second Ethernet frame stored in the central AP to the second distributed AP.

Further, after receiving, by using the network interface 63, the handover request sent by the central AP, the processor 61 may further preferentially send the stored frames of the wireless terminal to the wireless terminal by using the network interface 63.

Referring to FIG. 7, FIG. 7 is a schematic structural diagram of another distributed AP according to an embodiment of the present invention. As shown in FIG. 7, the distributed AP includes a processing module 71, a sending module 72, and a receiving module 73. The processing module 71 implements a function of the processor shown in FIG. 6. The sending module 72 implements sending interface functions of the wireless interface 632 and the wired interface 631. The receiving module 73 implements receiving interface functions of the wireless interface 632 and the wired interface 631.

A person of ordinary skill in the art may understand that all or some of the procedures of the methods in the embodiments may be implemented by a computer program instructing relevant hardware. The program may be stored in a computer readable storage medium. When the program runs, the procedures of the methods in the embodiments are performed. The storage medium may be a magnetic disk, an optical disk, a ROM or RAM, or the like.

What are disclosed above are merely examples of embodiments of the present invention, and certainly are not intended to limit the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims. 

What is claimed is:
 1. A method for handover between distributed access points, comprising: receiving, by a first distributed access point (AP), a handover request sent by a central AP, wherein the handover request comprises an address of a wireless terminal and an identifier of a second distributed AP; and sending, by the first distributed AP, a context handover request to the second distributed AP after receiving the handover request, wherein the context handover request comprises an unsent frame of the wireless terminal, the unsent frame is a frame that has not been sent to the wireless terminal among frames of the wireless terminal that are stored in the first distributed AP, and the context handover request is used to instruct the second distributed AP to send the unsent frame to the wireless terminal.
 2. The method according to claim 1, wherein the method further comprises: receiving, by the first distributed AP, a first Ethernet frame sent by the central AP, wherein a destination address of the first Ethernet frame is the address of the wireless terminal; saving, by the first distributed AP, the first Ethernet frame, wherein the frames of the wireless terminal that are stored in the first distributed AP comprise the first Ethernet frame; or converting, by the first distributed AP, the first Ethernet frame into a first radio frame, and saving the first radio frame, wherein the frames of the wireless terminal that are stored in the first distributed AP comprise the first radio frame; and sending, by the first distributed AP, a first instruction to the central AP when a storage volume of the first distributed AP is greater than a threshold, wherein the first instruction comprises the address of the wireless terminal, and the first instruction is used to instruct the central AP to decrease a rate of sending an Ethernet frame of the wireless terminal.
 3. The method according to claim 2, wherein the first instruction is further used to instruct the central AP to save a second Ethernet frame whose destination address is the address of the wireless terminal; and the method further comprises: receiving, by the first distributed AP, a context handover acknowledgment sent by the second distributed AP, wherein the context handover acknowledgment is an acknowledgment of the second distributed AP for the context handover request; and sending, by the first distributed AP, a handover acknowledgment to the central AP in response to the context handover acknowledgment, wherein the handover acknowledgment is used to instruct the central AP to send the second Ethernet frame stored in the central AP to the second distributed AP.
 4. The method according to claim 1, wherein after the receiving, by a first distributed AP, a handover request sent by a central AP, the method further comprises: preferentially sending, by the first distributed AP, the frames of the wireless terminal that are stored in the first distributed AP to the wireless terminal.
 5. A method for handover between distributed access points, comprising: receiving, by a central access point (AP), a first instruction sent by a first distributed AP, wherein the first instruction comprises an address of a wireless terminal, and the first distributed AP is a distributed AP in multiple distributed APs that serves the wireless terminal; decreasing, in response to the first instruction by the central AP, a rate of sending an Ethernet frame of the first distributed AP, and saving the Ethernet frame; and when the wireless terminal is handed over from the first distributed AP to a second distributed AP, sending, by the central AP, the Ethernet frame to the second distributed AP, and sending a handover request to the first distributed AP, wherein the handover request comprises the address of the wireless terminal and an identifier of the second distributed AP, the handover request is used to instruct the first distributed AP to send an unsent frame of the wireless terminal to the second distributed AP, and the unsent frame is a frame that has not been sent to the wireless terminal among frames of the wireless terminal that are stored in the first distributed AP.
 6. The method according to claim 5, wherein the sending the Ethernet frame to the second distributed AP comprises: sending, by the central AP, the Ethernet frame to the second distributed AP after the central AP receives a handover acknowledgment sent by the first distributed AP, wherein the handover acknowledgment is an acknowledgment for the handover request after the first distributed AP sends the unsent frame of the wireless terminal to the second distributed AP.
 7. A distributed access point (AP), comprising a processor, a memory, and a network interface, wherein the processor is connected to the memory and the network interface, and the processor is configured to: receive, by using the network interface, a handover request sent by a central AP, wherein the handover request comprises an address of a wireless terminal and an identifier of a second distributed AP; and send a context handover request to the second distributed AP by using the network interface after receiving the handover request, wherein the context handover request comprises an unsent frame of the wireless terminal, the unsent frame is a frame that has not been sent to the wireless terminal among stored frames of the wireless terminal, and the context handover request is used to instruct the second distributed AP to send the unsent frame to the wireless terminal.
 8. The distributed AP according to claim 7, wherein the processor is further configured to: receive, by using the network interface, a first Ethernet frame sent by the central AP, wherein a destination address of the first Ethernet frame is the address of the wireless terminal; save the first Ethernet frame to the memory, wherein the stored frames of the wireless terminal comprise the first Ethernet frame; or convert the first Ethernet frame into a first radio frame, and save the first radio frame to the memory, wherein the stored frames of the wireless terminal comprise the first radio frame; and send a first instruction to the central AP by using the network interface when a storage volume is greater than a threshold, wherein the first instruction comprises the address of the wireless terminal, and the first instruction is used to instruct the central AP to decrease a rate of sending an Ethernet frame of the wireless terminal.
 9. The distributed AP according to claim 8, wherein the first instruction is further used to instruct the central AP to save a second Ethernet frame whose destination address is the address of the wireless terminal; and the processor is further configured to: receive, by using the network interface, a context handover acknowledgment sent by the second distributed AP, wherein the context handover acknowledgment is an acknowledgment of the second distributed AP for the context handover request; and send a handover acknowledgment to the central AP by using the network interface in response to the context handover acknowledgment, wherein the handover acknowledgment is used to instruct the central AP to send the second Ethernet frame stored in the central AP to the second distributed AP.
 10. The distributed AP according to claim 7, wherein after receiving, by using the network interface, the handover request sent by the central AP, the processor is further configured to: preferentially send the stored frames of the wireless terminal to the wireless terminal by using the network interface.
 11. A central access point (AP), comprising a processor, a memory, and a network interface, wherein the processor is connected to the memory and the network interface, and the processor is configured to: receive, by using the network interface, a first instruction sent by a first distributed AP, wherein the first instruction comprises an address of a wireless terminal, and the first distributed AP is a distributed AP in multiple distributed APs that serves the wireless terminal; decrease, in response to the first instruction, a rate of sending an Ethernet frame of the first distributed AP, and save the Ethernet frame; and when the wireless terminal is handed over from the first distributed AP to a second distributed AP, send the Ethernet frame to the second distributed AP by using the network interface, and send a handover request to the first distributed AP by using the network interface, wherein the handover request comprises the address of the wireless terminal and an identifier of the second distributed AP, the handover request is used to instruct the first distributed AP to send an unsent frame of the wireless terminal to the second distributed AP, and the unsent frame is a frame that has not been sent to the wireless terminal among frames of the wireless terminal that are stored in the first distributed AP.
 12. The central AP according to claim 11, wherein the processor is further configured to: send the Ethernet frame to the second distributed AP by using the network interface after receiving, by using the network interface, a handover acknowledgment sent by the first distributed AP. 